Inux Wireless Driver Interface IntroductionBefore analyzing the wireless drive event and wireless driver configuration code under the Wpa_supplicant software Linux version, the implementation technology and development of the Linux wireless driver interface are introduced briefly. The Linux wireless driver interface has two standard interfaces, Wext (Wireless Extensions Wireless expansion interface) and nl80211 interface. Prior to the linux-2.6.18 ver
when writing Fullmac wireless drivers.
Wpa_supplicant: is a user-space application that primarily initiates the Mlme command and then processes the related results.
Hostpad: is a user space application, the main implementation station access authentication management.
CFG80211 is the Linux802.11 configuration API. cfg80211 is used for code wext (wireless-extensions), nl80211 is used to configure a cfg80211 device and is used for communication between
writing a fullmac wireless driver, mac80211 is not required.
• Wpa_supplicant: it is an application in the user space. It mainly initiates mlme commands and then processes related results.
•
2. 201780211
802.11 is the configuration API of Linux. 201780211 is used in the wext (Wireless-extensions) code. nl80211 is used to configure a 201780211 device and to communicate between kernel and userspace. Wext is
= HTCIssueRecv (target, pPacket); // receives data packets asynchronously.
À status = HIFReadWrite (pDev-> HIFDevice, // The command is sent to the sdio bus.
À is the same as the sending Process
// Sta connection process
À ar6000_rx (); when the connection command is received, ar-> arControlEp = ept = 1
À wmi_control_rx (arPriv-> arWmi, skb); // resolution command
À case (WMI_CONNECT_EVENTID): // connection command
À status = wmi_connect_event_rx (wmip, datap, len );
À A_WMI_CONNECT_EVENT (wmip
; sem_req )! = 0 // release the semaphore
// Interrupt sending or receiving process
À HTCRecvMessagePendingHandler
À status = HTCIssueRecv (target, pPacket); // receives data packets asynchronously.
À status = HIFReadWrite (pDev-> HIFDevice, // The command is sent to the sdio bus.
À is the same as the sending Process
// Sta connection process
À ar6000_rx (); when the connection command is received, ar-> arControlEp = ept = 1
À wmi_control_rx (arPriv-> arWmi, skb); // resolution command
À cas
eloop to wpa_global.
F. Call the wpa_supplicant_global_ctrl_iface_init function to initialize the global control interface.
G. Call the wpa_supplicant_dbus_ctrl_iface_init function to initialize the ingress control interface.
H. Write the daemon PID to pid_file.
2.3. wpa_supplicant_add_iface () function:
This function adds a network interface based on the parameters contained in the startup command line. You can add a few network interfaces.
A. Because wpa_supplicant is an important data struct
direct the user_data pointer in the global variable eloop to wpa_global.
F. Call the wpa_supplicant_global_ctrl_iface_init function to initialize the global control interface.
G. Call the wpa_supplicant_dbus_ctrl_iface_init function to initialize the ingress control interface.
H. Write the daemon PID to pid_file.
2.3. wpa_supplicant_add_iface () function:This function adds a network interface based on the parameters contained in the startup command line. You can add a few network interfaces.
A
. ? Fullmac: Its mlme is hardware-managed and does not require the use of mac80211 when writing Fullmac wireless drivers. ? Wpa_supplicant: is a user-space application that primarily initiates the Mlme command and then processes the related results. ? 2. cfg80211 CFG80211 is the Linux 802.11 configuration API. cfg80211 is used for code wext (wireless-extensions), nl80211 is used to configure a cfg80211 device and is used for communication between ker
are softmac, while FULLMAC devices are less.Fullmac: Its mlme is hardware-managed and does not require the use of mac80211 when writing Fullmac wireless drivers.wpa_supplicant: is a user-space application that primarily initiates the Mlme command and then processes the related results.•2. cfg80211CFG80211 is the Linux 802.11 configuration API. cfg80211 is used for code wext (wireless-extensions), nl80211 is used to configure a cfg80211 device and is
by Google)
(8). # ping www.baidu.com # successfully ping the Baidu domain name.
On Wednesday, I did a lot of chores. I planned the firmware path, which is still related to driver compilation. I just needed to re-compile the driver. The focus is to manually start wpa_supplicant. Wpa_supplicant:
Supplicant not running, cannot connect.
1. manually start wpa_supplicant
When there is no problem with the driver module, I will force it on the road, bu
immediately. For example, to connect to a WEP-certified wireless network: iwconfig wlan0 essid "myhome" key 0123-4567-89 if you want to connect to a WPA-certified wireless network, wireless-tools will be helpless and wpasupplicant must be used. Wpasupplicant does not simply use the command line configuration like wireless-tools. it must first start a service process, then use another command line tool to set the service process, and the service process must always run during WIFI connection. Wh
. However, since wpa_supplicant is a standard open-source project, it has been transplanted to many platforms, I haven't looked at the intermediate process yet. The concern is how wpa_supplicant sends the command to the DRIVER after receiving the upper-layer command, the parsing action of the DRIVER after receiving the command, the process of calling the DRIVER function, and the details of the DRIVER's register control. Because the code should be kept confidential, I will not mention which WIFI
, dhcpcd.conf inside
4,init.rc set SetProp wifi.interface "Mlan0")
3. Compiling method
Source Env.mk;make can be, drive is in the path of Os/linux under the Rt3070sta.ko. The driver name used here should be consistent with the driver name specified by the HAL layer WIFI.C
Four. Wap_supplicant Related configuration
Modification of 3.1 wpa_supplicant.conf configuration file
Used in Ctrl_interface=dir=/data/system/wpa_supplicantgroup=wifi #这个路径在wifi. C
3.2 The entire environment must be compiled
] Error 1MAKE[1]: * * * [_MODULE_/USR/LOCAL/SRC/HYBIRD-WL] Error 2MAKE[1]: Leaving directory '/usr/src/kernels/2.6.32-279.el6.i686′Make: * * * [ALL] Error 2
Google a bit, found that the CentOS6.3 version of this newspaper is the same error, find a lot of information there is no good solution. Looking back at Broadcom's REAMME.txt, the inside wrote a passage:
If your driver does not build, check to make sure you have installed theKernel package described in the requirements above.
T
protected] ~]# wpa_supplicant-i wlan0-c/etc/wpa_supplicant/wpa_supplicant.conf-d Wext-bioctl[siocsiwap]: Ope Ration not permittedView the linked network[[emailprotected]~]#iwconfiglono wirelessextensions.eth0nowirelessextensions.wlan0 ieee802.11bgnessid: "Tyedus" nickname: "You can see that the network is connected (under normal circumstances you can see the lights on the wireless card flashing)* * Sometimes it's not even possible that the network si
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.